
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>导引界面</title>
<link href="css/index.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body,td,th {
	font-family: "微软雅黑";
}
</style>
</head>
<body style="background-color:#1c77ac;overflow:hidden;">
    <div class="logintop">    
        <span>欢迎登凉山州中考信息管理系统（学生端）</span>    
        <ul>
            <li><a href="#">帮助</a></li>
        </ul>    
    </div>
<form action="/signup/checkSignUp" th:action="@{/signup/checkSignUp}" th:object="${student}"
					method="post" id="loginform" class="formbox">
    <div class="bodybox">
    	<span class="hd"></span> 
        <div class="loginbox" style="background:none" >
           <div class="tit">中考报名登录入口</div>
           <div class="ts">友情提示：使用火狐 谷歌 360极速浏览器</div>
           
           <div class="lgbox">
           		<div style=" height:20px; overflow:hidden"></div>
                
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400">
<table border="0" cellspacing="0" cellpadding="0" class="lgtab" align="center">
                  <tr>
                    <th>身份证号：</th>
                    <td><input type="text" name="sfzh" id="sfzh" maxlength="18"></td>
                  </tr>
                  <tr>
                    <th>密 码：</th>
                    <td><input type="password" name="password" id="password" maxlength="8"></td>
                  </tr>
                  <tr>
                   <th></th>
                    <td><div id="v_container" style="width: 140px; height: 32px;"></div></td> 
                  </tr>                  
                  <tr>
                    <th>验证码：</th>
                    <td><input type="text" name="yzm"
							id="yzm" maxlength="4"></td>
                  </tr>
                  <tr>
                    <th></th>
                    <td><input type="submit" class="sub" id="loginBtn"  value="登录" ></td>
                  </tr>
                </table>    
    </td>
    <td class="boxr" style=" ">考生使用身份证号登录，初始密码为身份证号后8位，初次登录后必须修改密码，修改后使用新密码再次登录</td>
  </tr>
</table>	
<div class="tbox"> </div>
           </div>
        </div>
    </div>
</form>
    <div class="loginbm"></div>
</body>

<script language="JavaScript" src="js/jquery.js"></script>
<script src="js/cloud.js" type="text/javascript"></script>
<script language="javascript">
	$(function(){
    $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
	$(window).resize(function(){  
    $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
    })  
});  
</script> 
<script src="../js/jquery-1.12.3.js"></script>
<script src="../js/gVerify.js"></script>
<script src="../js/commen.js"></script>
<script src="../js/checkPassword.js"></script>
<script type="text/javascript" language="javascript" >
function display(){ document.getElementById("box1").style.display="block";  } function disappear(){ document.getElementById("box1").style.display="none";  }
function display1(){ document.getElementById("box2").style.display="block";  } function disappear1(){ document.getElementById("box2").style.display="none";  }
</script>


<script>
	/*
	 主要有一下几个方面进行验证：
	 1.报名号和密码最大长度为12
	 2.密码必须包含数字和字符
	 3.密码长度最低为8
	 4.验证码不正确需要重新输入
	 * */
	var verifyCode = new GVerify("v_container");
	$("#loginBtn").on('click', function() {
		var res = verifyCode.validate($('#yzm').val());
		if (!res) {
			alert("错误提示：\n\验证码不正确.");
		    return false;}
		var password1 = $("#password").val();
		if (password1 == "" || $("#sfzh").val() == "") {
			alert("错误提示：\n\身份证和密码不允许为空！");
			 return false;
		} else {
				if (ckuser($("#sfzh").val()))
				    {
					$('#loginform').submit();
				    } 
				else {return false}
			   }
	});

$("#sfzh").click(function(){

		$(".bmhpassworderror").html("")
	})
	
	
function ckuser(str)
{
	var patrn=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
	
	if(!patrn.test(str))
	{
		alert("错误提示：\n\身份证号格式不正确.");
		return false;
	}
	else
		return true;
	
}
function chkpass(str) //判断密码
{
	var patrn=/^[a-zA-Z0-9_]{6,20}$/;
	if(!patrn.test(str))
	{
		alert("错误提示：\n\登陆密码不正确.");
		return false;
	}
	else
		return true;
}
//主判断

</script>
</html>

